angular.module('faApp')
  .service('beService', ['ajaxService', '$http', '$location', '$q', function(ajaxService, $http, $location, $q) {

    this.getDataList = function(cfg) {
      cfg.type = "queryDateList";
      return ajaxService.post(ajaxService.getApiUri("USER_BEHAVIOR_LIST"), cfg || {});
    };
    this.getDateInfo = function(cfg) {
      cfg.type = "queryDateDetail";
      return ajaxService.post(ajaxService.getApiUri("USER_BEHAVIOR_LIST"), cfg || {});
    };

    this.faUserVisit = function(loginName) {
      return ajaxService.post(ajaxService.getApiUri("FA_USER_VISIT"), { loginName: loginName });
    };

    this.addRemark = function(visit) {
      return ajaxService.post(ajaxService.getApiUri("FA_USER_VISIT_ADD"), visit || {});
    }
  }]);
